//
global.isDev = process.env.NODE_ENV === 'development';
global.isDebug = window.location.href.indexOf('dev') !== -1;

//
import React from 'react';
import ReactDOM from 'react-dom';
import {
  HashRouter,
  Route,
  Switch,
} from 'react-router-dom';

//
import Home from './module/home';
import User from './module/user';
import UserPassword from './module/user-password';
import BuyBack from './module/buy-back';
import Investment from './module/investment';
import InvestmentAudit from './module/investment-audit';
import InvestmentEdit from './module/investment-edit';
import Product from './module/product';
import ProductEdit from './module/product-edit';
import Service from './module/service-list';
import ServiceEdit from './module/service-edit';
import RegisterBg from './module/register-bg';
import Car from './module/car-list';
import CarEdit from './module/car-edit';
import InvestmentList from './module/invest-list';
import UserDownload from './module/user-download';
import UserEdit from './module/user-edit';
import UserList from './module/user-list';

//
import Menu from './core/components/menu';


//
ReactDOM.render(
  <HashRouter>
    <div>
      <Menu></Menu>
      <div id="page-wrapper">
        <div className="container-fluid">
          <Switch>
            <Route path="/" exact component={Home} />
            <Route path="/user" component={User} />
            <Route path="/password" component={UserPassword} />
            <Route path="/buy-back" component={BuyBack} />
            <Route path="/investment" component={Investment} />
            <Route path="/invest-audit" component={InvestmentAudit} />
            <Route path="/invest-list" component={InvestmentList} />
            <Route path="/investment-edit" component={InvestmentEdit} />
            <Route path="/product" component={Product} />
            <Route path="/product-edit" component={ProductEdit} />
            <Route path="/service-list" component={Service} />
            <Route path="/service-edit" component={ServiceEdit} />
            <Route path="/register-bg" component={RegisterBg} />
            <Route path="/car" component={Car} />
            <Route path="/car-edit" component={CarEdit} />
            <Route path="/export/user" component={UserDownload} />
            <Route path="/customer-list" component={UserList} />
            <Route path="/customer-edit" component={UserEdit} />
          </Switch>
        </div>
      </div>
    </div>
  </HashRouter>,
  document.getElementById('wrapper')
);
